#include "StdAfx.h"
#include ".\mfcwpfimage.h"

CMFCWPFImage::CMFCWPFImage(void)
{
}

CMFCWPFImage::~CMFCWPFImage(void)
{
}

///<summary>
///Draw the picture contained in this element
///according to the "IsEnabled" attribute
///</summary>
///<param name='pCDCPlus'>
///the pointer to the GDI+ display context
///</param>
///<returns>
///true if the element is enabled; false otherwise
///</returns>
bool CMFCWPFImage::DrawSelf(CDCPlus * pCDCPlus)
{
	if (CMFCWPFElement::DrawSelf(pCDCPlus))
	{
		CString szImagePath;
		if (m_oAttributes.GetAttribute(_ATTRIBUTESOURCE, szImagePath))
		{
			pCDCPlus->StretchBltPlus(m_oRect.left, m_oRect.top, m_oRect.Width(), m_oRect.Height(), szImagePath, 0, 0, 0, 0);
		}
		return true;
	}
	return false;
}